﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using static RepositoryEntity.WorkFlow_InstanceStep;

namespace RepositoryEntity
{

    /// <summary>
    /// 工作流实例表
    /// </summary>
    public class WorkFlow_Instance:BaseDeleteEntity
    {

        ///// <summary>
        ///// 主键ID
        ///// </summary>
        //[Required]
        //[Column(TypeName = "varchar(32)")]
        //public string ID { get; set; }

        /// <summary>
        /// 工作流模板Id
        /// </summary>
        [Column(TypeName = "varchar(36)")]
       
        public string  ModelId { get; set; }

        /// <summary>
        /// 状态
        /// </summary>
        [Required]
        public InstanceStepStatus Status { get; set; }

        /// <summary>
        /// 描述
        /// </summary>
        [Column(TypeName = "nvarchar(64)")]
        public string Description { get; set; }

        /// <summary>
        /// 申请理由
        /// </summary>
        [Column(TypeName = "nvarchar(64)")]
        public string Reason { get; set; }

        /// <summary>
        /// 添加时间
        /// </summary>
        [Column(TypeName = "datetime")]
        public DateTime CreateTime { get; set; }

        /// <summary>
        /// 添加人Id
        /// </summary>
        [Column(TypeName = "varchar(36)")]
        public string Creator { get; set; }

        /// <summary>
        /// 出库数量
        /// </summary>
        public int OutNum { get; set; }

        /// <summary>
        /// 出库物资Id
        /// </summary>
        [Column(TypeName = "varchar(36)")]
        public string OutGoodsId { get; set; }

        public enum InstanceStepStatus
        {
            审批中 = 1,
            结束 = 2,
            作废 = 3,
            
        }

    }
}
